package com.xiaotou.domain;

public enum Roles {
	Thrief(0), Police(10);

	private int value;

	Roles(int value) {
		this.value = value;
	}

	public int getValue() {
		return this.value;
	}

	public Roles valueOf(int value) {
		for (Roles role : values()) {
			if (role.getValue() == value) {
				return role;
			}
		}
		throw new RuntimeException("error role value: " + value);
	}
}
